package cn.felord.autoconfigure;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;
import java.util.Map;

/**
 * Oss properties
 *
 * @author felord.cn
 * @since 2020 /8/24 18:20
 */
@Data
@ConfigurationProperties(prefix = "oss")
public class OSSProperties {

    private List<Aliyun> aliyun;
    private Huawei huawei;
    private Minio minio;
    private List<Tencent> tencent;


    /**
     * Minio OSS.
     */
    @Data
    public static class Minio {
        private boolean active;
        private String region;
        private String endpoint;
        private String accessKey;
        private String secretKey;
    }

    /**
     * Aliyun OSS.
     */
    @Data
    public static class Aliyun {
        private boolean active;
        private String endpoint;
        private String bucketName;
        private String accessKeyId;
        private String accessKeySecret;
        private String cdn;
    }

    /**
     * Huawei OSS.
     */
    @Data
    public static class Huawei {
        private boolean active;
        private String endpoint;
        private String accessKeyId;
        private String accessKeySecret;
    }

    @Data
    public static class Tencent {
        private boolean active;
        private String bucketName;
        private final String accessKey;
        private final String secretKey;
        private final String region;

    }
}
